<%--
   toolbar botton
   Copyright (c) 2013 ISPERP
   Version : 1.0.0
 --%>
<%@ tag language="java" pageEncoding="UTF-8"
	trimDirectiveWhitespaces="true"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<%@ attribute name="id" required="false" type="java.lang.String"
	description="按钮的唯一标识"%>

<%@ attribute name="text" required="false" type="java.lang.String"
	description="按钮显示的文本"%>
	
<%@ attribute name="type" required="false" type="java.lang.String"
	description="类型，默认button"%>
	
	
<%@ attribute name="cssClass" required="false" type="java.lang.String"
	description=" 按钮的css"%>

<%@ attribute name="icon" required="false" type="java.lang.String"
	description=" 按钮图标的css"%>

<%@ attribute name="onclick" required="false" type="java.lang.String"
	description=" 单击按钮的事件"%>

<c:set var="type" value="${empty type ? 'button' : type}">
</c:set>
<c:choose>
	<c:when test="${empty icon}">
		<button id="${id }" type="button" class="button ${cssClass}"
			onclick="${onclick};return false;">${text }</button>
		<jsp:element name="button">
			<jsp:attribute name="class">button flat block</jsp:attribute>
			<jsp:attribute name="id">${id }</jsp:attribute>
			  <jsp:body>  ${text}</jsp:body>
		</jsp:element>
	</c:when>
	<c:otherwise>
		<button id="${id }" type="${type }" class="button  ${cssClass}"
			onclick="${onclick};return false;">
			<span class="icon ${icon }"></span> ${text}
		</button>
	</c:otherwise>
</c:choose>


